home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 25 / AACD 25.iso / AACD / Magazine / Backups / FBackNG / fbackng.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-08-30  |  2.4 KB  |  86 lines

  1. // $VER: fbackng.h 1.2.0 (10-12-1999)
  2. #define FBACKNG_H
  3. // AmigaOS
  4. #include <exec/types.h>
  5. #include <exec/memory.h>
  6. #include <exec/lists.h>
  7. #include <exec/nodes.h>
  8. #include <dos/exall.h>
  9. #include <dos/datetime.h>
  10. #include <libraries/dos.h>
  11. #include <proto/exec.h>
  12. #include <proto/dos.h>
  13. #include <proto/xpkmaster.h>
  14.  
  15. // SAS/C
  16. #include <ctype.h>
  17. #include <stdio.h>
  18. #include <stdlib.h>
  19. #include <string.h>
  20. #include <dos.h>
  21. #include <sys/dir.h>
  22.  
  23. // Constants
  24. #define STR_BACKUPPHASE "----- Backup Phase"
  25. #define STR_MIRRORPHASE "----- Mirror Phase"
  26. #define STR_DELETEPHASE "----- Delete Phase"
  27. #define OUT_QUIET       0
  28. #define OUT_NORMAL      1
  29. #define OUT_DETAIL      2
  30. #define OUT_DEBUG       3
  31. #define BUF_SIZE        256000
  32.  
  33. // CLI Parameter lengths
  34. #define LEN_PATH        256
  35. #define LEN_STRING      32
  36.  
  37. typedef struct Option_Flags {
  38. int     opt_validuser;      
  39. int     opt_source;     // source path (from) REQ
  40. int     opt_dest;       // destination path (to) REQ
  41. int     opt_simulate;   // simulate mode
  42. int     opt_recursive;  // recursive traversing
  43. int     opt_verbose;    // verbosity level
  44. int     opt_priority;   // set priority
  45. int     opt_compress;   // enable compression
  46. int     opt_every;      // ignore archive bit = all
  47. int     opt_touch;      // modify date/timestamp on destination
  48. int     opt_nonotes;    // do not copy filenotes
  49. int     opt_pattern;    // only process files matching pattern
  50. int     opt_log;        // write to log
  51. int     opt_before;     // only files < date
  52. int     opt_after;      // only files > date
  53. int     opt_mirror;     // do mirror phase
  54. int     opt_skip;       // do not run backup phase
  55. int     opt_delete;     // run dir clean phase
  56. int     opt_noarch;     // do not set archive bit after backup
  57. } FLOPTS;
  58.  
  59. typedef struct Option_Values {
  60. char    val_user[LEN_PATH];    
  61. char    val_temp[LEN_PATH];
  62. char    val_source[LEN_PATH];
  63. char    val_dest[LEN_PATH];
  64. int     val_verbose;
  65. char    val_compress[LEN_STRING];
  66. char    val_pattern[LEN_STRING];
  67. char    val_log[LEN_PATH];
  68. char    val_before[LEN_STRING];
  69. char    val_after[LEN_STRING];
  70. } VAOPTS;
  71.  
  72. extern FLOPTS optflg;
  73. extern VAOPTS optval;
  74. extern ULONG tot_files;
  75. extern ULONG prc_files;
  76. extern ULONG del_dirs;
  77. extern ULONG tot_direc;
  78. extern struct DateTime dt_Before;
  79. extern struct DateTime dt_After;
  80.     
  81. // Prototypes
  82. int getopt(int argc, char **argv, char *opts);
  83. int GetRegisteredUser(char *, char *);
  84. void check_write_log(char *custom);
  85. // The End
  86.